package smb.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingTarget;
import smb.domain.Student;
import smb.vo.StudentVo;

import java.util.List;

@Mapper(componentModel = "spring")
public interface StudentMapper {
    StudentVo studentToStudentVo(Student student);
    List<StudentVo> studentsToStudentVos(List<Student> students);
    @Mapping(target = "scores", ignore = true)
    Student studentVoToStudent(StudentVo studentVo);
    @Mapping(target = "scores", ignore = true)
    void updateStudent(StudentVo studentVo, @MappingTarget Student student);
}
